﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using JOIN.Rights.BLL;
using JOIN.Rights.Model;

/*------------------------------------------------------------------------
   苏州捷安信息科技有限公司 版权所有			
   文件名: TU_User.cs
   作 者 : 席吉波
   日 期 : 2012/10/12 16:25:22
   备 注 : 当您对本文件更改时请写明修改人、修改日期以及是由
  ------------------------------------------------------------------------
*/
namespace JOIN.Rights.Apps
{
    public partial class TU_User : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.init();
            if(!IsPostBack)
            {
            	//this.init();
                loadData();
            }
            btnTest.Click += new EventHandler(btnTest_Click);
        }

        void btnTest_Click(object sender, EventArgs e)
        {
            Control ctr = Page.FindControl("cns_Roles");
        }
        
        /// <summary>
        ///  Databind control init
        /// </summary>	
        private void init()
        {
            this.databind1.Data = new UserInfo() { }; 
        }
        /// <summary>
        /// 载入数据
        /// </summary>
        private void loadData()
        {
            if (string.IsNullOrEmpty(KeyID))
            {
                return;
            }
            UserInfo data = new UserInfo() { UserID = int.Parse(this.KeyID) };
            data.SelectByKeys();
            this.databind1.Data = data;

        }
        /// <summary>
        /// 主键值
        /// </summary>
        private string KeyID
        {
            get { return Request.QueryString["keyid"]; }
        }
    }
}